/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fireSensor;

import javax.swing.JOptionPane;

/**
 *
 * @author admin
 */
public class FireSensor implements Runnable{
    private int temperature = 34;
    private int smoke = 2;
    fireSensorUI fsUI = null;
    
    public FireSensor() {
        fsUI = new fireSensorUI();
        fsUI.setVisible(true);
    }
    
    
    public int getTemperature() {
        return this.temperature;
    }
    
    public int getSmokeLevel() {
        return smoke;
    }
    
    public void setTemperature(int temp) {
        temperature = temp;
    }
    
    public void run() {
        while (true) {
            temperature = fsUI.getTemperature();
            smoke = fsUI.getSmokeLevel();
        }
    }
}
